# Maintainer: David Runge <dvzrv@archlinux.org>

pkgname=faustpp
pkgver=1.0.0
pkgrel=2
pkgdesc="A post-processor for faust, which allows to generate with more flexibility"
arch=(any)
url="https://github.com/jpcima/faustpp"
license=(custom Boost)
depends=(faust python python-jinja)
makedepends=(python-build python-installer python-setuptools python-wheel)
source=($pkgname-$pkgver.tar.gz::https://github.com/jpcima/$pkgname/archive/refs/tags/v$pkgver.tar.gz)
sha512sums=('e40ca88833977c4c6c145f4c638eaca230e35f3b0fea2d8f99e397456c33a9eba28a16c34254a7929aceaaee59f90c48b80d323aaea243875a4dd8e4dd921c81')
b2sums=('9ead53c9e07431ad8d1dccf6e00ffb91aef51ff995456f4c3abe2b7b389aa9777aeca3504ab3880c714e0a4bd04a7de1a0aafac34b269e8ea179ac595660c4c3')

build() {
  cd $pkgname-$pkgver
  python -m build --wheel --no-isolation
}

package() {
  cd $pkgname-$pkgver
  python -m installer --destdir="$pkgdir" dist/*.whl
  install -vDm 644 LICENSE-EXCEPTION.md -t "$pkgdir/usr/share/licenses/$pkgname/"
  install -vDm 644 README.md -t "$pkgdir/usr/share/doc/$pkgname/"
}
